package de.fhk.fst.dvr.helper

import de.fhk.fst.dvr.recordings.DvrInterface
import java.io.InputStream
import java.util.List

import de.fhk.fst.dvr.recordings.DvrInterface
import de.fhk.fst.dvr.recordings.Recording

class RecordingMockupService implements DvrInterface {

  @Override
  public boolean connect(Properties connectionProperties) {
    return true
  }

  @Override
  public boolean connect(String host, String username, String password) {
    Properties properties = new Properties()
    properties.putAt "host", host
    properties.putAt "username", username
    properties.putAt "password", password
    return connect(properties)
  }

  @Override
  public List<Recording> listRecordings() {
    Recording[] recordings = new Recording[2]
    recordings[0] = new Recording("04-04-10_2015_RTL_DeutschlandSucht.mpeg")
    recordings[1] = new Recording("05-04-10_2215_PRO7_TV_TOTAL.mpeg")
    return Arrays.asList(recordings)
  }

  @Override
  public InputStream streamVideo(String filename) {
    return null
  }
}
